package com.xiaoshuidi.cloud.module.report.dal.mapper.bigdata;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaoshuidi.cloud.framework.mybatis.core.mapper.BaseMapperX;
import com.xiaoshuidi.cloud.module.report.controller.bigdata.vo.*;
import com.xiaoshuidi.cloud.module.report.dal.DO.ApartmentDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * 大屏整体运营概况 Mapper
 *
 * @author sxx
 */
@Mapper
//@InterceptorIgnore(tenantLine = "true")
public interface OverViewMapper extends BaseMapperX<ApartmentDO> {

    HouseStatisticsVO getHouseStatistics();

    /**
     * 统计分散式小区
     *
     * @return
     */
    Long disperseAreaCount();

    RevenueVO getRevenue();

    /**
     * 房源地图统计
     *
     * @return
     */
    List<HouseMapStatisticsVO> houseMapStatistics();

    List<PieChartResultVO> groupCustomerTypeByCount();

    CustomerAgeIntervalVO personalCustomerAgeIntervalCount();

    BusinessStatisticsVO businessStatisticsCount();

    List<ApartmentAvgMonthRentVO> apartmentAvgMonthRentStatistics(Page page,
                                                                  @Param("startTime") LocalDate startTime,
                                                                  @Param("endTime") LocalDate endTime);

    /**
     * 当年门店营收
     * @return
     */
    List<ApartmentRevenueVO> apartmentRevenueByYear(Page page,@Param("year") Integer year);


    /**
     * 门店入住人数 包括同住人
     * @return
     */
    List<StoreCheckInVO>  storeCheckInAnalysisByYear(Page page,@Param("year") Integer year);
}
